package com.woniu.learnmybatis.controller;

import com.woniu.learnmybatis.entity.User;
import com.woniu.learnmybatis.mapper.UserMapper;
import com.woniu.learnmybatis.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

/**
 * created by woniu201
 * created in 2018/4/18
 */
@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping(value = "/findall", method = RequestMethod.GET)
    public void findAll(){
        userService.findAllUser();
    }

    @RequestMapping(value = "/insert", method = RequestMethod.GET)
    public void insert(){
        userService.insert();
    }
}
